package com.atguigu.democustomer.mapper;

import com.atguigu.democustomer.bean.Customer;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
@DS("mysql0718")
public interface CustomerMapper extends BaseMapper<Customer> {

    @Select("select * from customer where id=${id}")
    public Customer getCustomerByIdWithMapper(@Param("id") String id);

    @Select("select count(*) from customer")
    public Long getCount();
}
